PICTURETHIS(TM) "SHAREWARE" VERSION RELEASE 4.00 DECEMBER 31, 1991 USER MANUAL, PART 2 OF 7 PARTS Copyright 1988, 1989, 1990, 1991 by Patricia Y. Williams and Gregory Williams, All Rights Reserved. HortIdeas Publishing, 460 Black Lick Road, Gravel Switch, KY 40328 U.S.A. 9. FINDING ENDPOINTS To move the cursor to an endpoint of a previously drawn curve, first press the Del key on the numeric keypad (with NumLock NOT toggled on and Shift NOT pressed). The cursor jumps to the endpoint which was APPROXIMATELY closest to the cursor's position when Del was pressed. (The measure of "closeness" used by PictureThis here is the sum of the horizontal distance and the vertical distance, rather than the true distance, for faster program operation.) All of the curves having that endpoint become dashed to help you distinguish the endpoint at which the cursor is now located from other nearby endpoints. If you want to move the cursor to another endpoint, press Space or + to shift the cursor to the NEXT closest endpoint on the screen to the ORIGINAL cursor position when the Del key was pressed. Or press - to move the cursor to the "previous" endpoint (which at first is the FURTHEST endpoint from the ORIGINAL cursor location). Continue pressing Space, +, and/or - until the cursor is at the desired endpoint. When the cursor is at the desired endpoint, press any key except Space, +, -, Enter, or Esc. The cursor remains at the selected endpoint, and the operation specified by the pressed key is carried out (for example, if F1 was pressed, a new curve is started); if a currently invalid key is pressed, the speaker beeps. If you prefer to remain at the endpoint and NOT start another operation, press Enter. In either case, the curves that were dashed become solid again. Pressing Esc at any time during the operation moves the cursor back to its original position when Del was pressed and returns all dashed curves to solid again. The cursor can be moved to an endpoint by using this operation any time you can move with the cursor keys, except when moving along a guideline (see Sections 8.2 and 8.3). Because the internal coordinates of the endpoints are finer than the screen resolution (see Section 20.3) at all screen magnifications except the highest (2400%), the cursor can APPEAR to be at an endpoint when it ISN'T -- the screen resolution is too low to distinguish "close to" from "at." IF YOU WANT TO POSITION THE CURSOR EXACTLY ON AN ENDPOINT, USE THE MOVE-TO-ENDPOINT OPERATION TO BE SURE. 10. SMOOTHING CURVES 17 Using smoothing, you can draw a succession of curves end- to-end so that two curves sharing an endpoint also have the same direction (are tangent to each other) at the shared endpoint. Smoothing can be accessed either manually or automatically. 10.1. MANUAL SMOOTHING For manual smoothing, during the drawing of a curve (after F1 has been pressed at least once to define an endpoint), press S to move the cursor to the endpoint associated with the currently selected control point IF ONE OR MORE PREVIOUSLY DRAWN CURVES ALSO HAVE THAT ENDPOINT. If NO previously drawn curves also have that endpoint, then you the speaker beeps (if toggled on) and an error message appears (if toggled on); the cursor remains where it is. If there is ONE previously drawn curve with ONE end at that endpoint, a line tangent to that previously drawn curve at the endpoint will appear. If there are TWO OR MORE previously drawn curves with that endpoint, or ONE previously drawn curve with BOTH of its ends at that endpoint, a prompt ("Next: +, Space"/ "Previous: -"/"Select: Enter") appears on the left side of the screen, and one of the previously drawn curves is dashed to distinguish it. If you want to draw the new curve tangent to the dashed curve at their shared endpoint, press Enter. A guideline tangent to the dashed curve at its endpoint appears. Otherwise, by repeatedly pressing Space, +, and/or -you can cause each of the previously drawn curves with the selected endpoint to be dashed successively. When the curve to which you want the new curve being drawn to be tangent at their shared endpoint is dashed, press Enter to select it. A guideline tangent to the dashed curve at its endpoint appears, unless guidelines are toggled off (see Section 10.3). For a previously drawn curve with both ends at the endpoint, pressing Enter when that curve is dashed causes a guideline tangent to one of its ends to appear; if you want to select the tangent to the OTHER end, instead press Esc, then S, and then Space, +, and/or - (repeatedly) to cycle through the curves until the curve with both ends at the selected endpoint again becomes dashed. This time when Enter is pressed, a guideline tangent to the OTHER end appears, unless guidelines are toggled off (see Section 10.3). The new curve's control point associated with the shared endpoint is constrained to move along the tangent guideline (whether visible or not). To move the control point with the cursor, first use the cursor key on the numeric keypad closest to the guideline direction (away from the previously drawn curve). Then use the "opposite" cursor key to move the other direction on the guideline (example: first 9, then 1). Note: By pressing Ins, you can toggle the cursor to move 1 or 10 pixels (NOT any other units, regardless of the current units) per key press along the guideline. The new curve being drawn and the previously drawn curve have the same tangent at the endpoint they share: in other words, the two curves together form a SMOOTH curve (OR, if you move the control point back along the tangent guideline in the direction of the previously drawn curve, the two curves form a CUSP). Note: To GUARANTEE a truly smooth curve or a true cusp, you MUST move the control point of the new curve which 18 is associated with the shared endpoint AT LEAST ONE pixel along the tangent guideline. On a tangent guideline, control point position is indicated by a "missing" (background-colored) pixel. Move between the two control points of the new curve by pressing F2. A control point not constrained to move along a tangent line is moved by pressing the numeric keypad number keys, as usual. Note that BOTH control points of a new curve can be constrained by smoothing, if both of the new curve's endpoints are located at endpoints of previously drawn curves (press S when one of the control points is selected, select a previously drawn curve for smoothing, then press F2 to choose the other control point, press S again, and select another previously drawn curve for smoothing). After shaping the new curve as you desire by positioning its control points, press F3 to set it; this also erases tangent guidelines. While drawing with smoothing, pressing Esc when the cursor is at the control point associated with an endpoint WITH a tangent constraint causes the tangent guideline to be erased and leaves the cursor at the same position; then that control point can be moved WITHOUT constraint by the numeric keypad number keys. Pressing Esc when the cursor is at the control point associated with an endpoint WITHOUT a tangent constraint erases any tangent guidelines, and provides the usual escape from drawing a curve. 10.2. AUTOMATIC SMOOTHING For quick drawing of a succession of continuous smooth curves, you can toggle automatic smoothing on by pressing A. Pressing A again toggles automatic smoothing off and results in the cursor returning to the FIRST endpoint of a curve, instead of the second endpoint, when the curve is set. Pressing A yet again results in the cursor returning to the second endpoint of a curve when the curve is set, with automatic smoothing toggled off. This three-way toggling can be done almost any time a menu does not appear at the top of the screen, and the toggled state remains in effect until you toggle again. The automatic smoothing indicator in the status box reads "A " when automatic smoothing is off and the cursor returns to the second endpoint when a curve is set, "A+" when automatic smoothing is on and the cursor returns to the second endpoint when a curve is set, and "A-" when automatic smoothing is off and the cursor returns to the first endpoint when a curve is set. With automatic smoothing ON, just after you have finished drawing a curve (F3 has been pressed and the cursor is positioned at the second endpoint of the curve), if you press F1 to start drawing a new curve with its first endpoint at the second endpoint of the curve just drawn, a guideline tangent to the curve just drawn appears at its second endpoint (if guidelines are toggled on; see Section 10.3). Proceed by defining a second endpoint for the new curve as usual (move the cursor with the numeric keypad number keys and press F1 again). The control point associated with the first endpoint of the new curve (which is also the second endpoint of the curve just drawn) is constrained to move along the tangent guideline. Other details are as given above with manual smoothing selected. 19 10.3. REMOVING GUIDELINES If you don't want to see tangent guidelines during smoothing, or if you don't want the guidelines visible when drawing a circle, oval, or square (perhaps for a better view of an area of a drawing having many curves close together), press E. This is a toggle; pressing it a second time restores the guidelines to view. "Invisible" guidelines still constrain cursor movement during smoothing or drawing a square or an oval. The guideline erase indicator in the status box reads "E-" if the guidelines are visible, "E+" if they are invisible. 11. CUTTING CURVES Curves can be connected to each other with precision ONLY at shared endpoints (see Section 9) -- but you CAN attach new curves to arbitrary points on previously drawn curves. How? By "cutting" a previously drawn curve into TWO smoothly connected curves, which together very closely approximate the original curve. These two curves share a NEW endpoint which results from the cutting operation. To begin cutting a curve, press F5. The state changes to "CUT" and the cursor moves to the nearest endpoint; all curves associated with that endpoint are dashed, just as if you had pressed Del (see Section 9). Now press Space, +, and/or - (repeatedly) until the cursor is on one of the endpoints of the curve you wish to cut. Press Enter to select that endpoint. If only one curve is associated with the selected endpoint, it becomes dashed. If two or more curves are associated with the selected endpoint, dash the curve you want to cut by pressing Space, +, and/or -, and select it with Enter. The selected curve does NOT have to be entirely on the visible screen. Next, move the cursor ALONG the curve with the cursor keys. Ins can be used to switch the cursor movement increment between 1 and 10 pixels. (Note: If the curve goes off the edge of the screen and then back onto the screen, the moving cursor will jump from where the curve leaves the screen to where it reenters the screen.) When the cursor is located where you want a new endpoint, press F3. A new endpoint and two new curves replace the original curve, and the state is "FREE." The new curves have the same line parameters as the original curve (see Sections 12 and 15). These new curves are automatically inserted into the trail of which the original curve was part, in place of the original curve (see Section 14). 12. MODIFYING CURVES To alter a previously drawn curve, press F4. The state becomes "CURMOD." The cursor automatically jumps to the closest endpoint and any curves associated with that endpoint are dashed (as if you pressed Del). Press Space, +, and/or - repeatedly (see Section 9) until the cursor is on one of the endpoints of the curve you want to modify. Then press Enter. If there is only one curve with the selected endpoint, it is dashed, and a menu box (described below) appears. If there are two or more curves with the selected endpoint, a box with instructions ("Next: +, 20 Space"/"Previous: -" /"Select: Enter") appears, and one curve with the selected endpoint is dashed. If you want to alter the dashed curve, press Enter; otherwise, by pressing Space, +, and/or -repeatedly, you can cause any of the curves with the endpoint to be dashed successively. When the curve you want to modify is dashed, press Enter; a menu box appears, with three options: Erase, Change, and Line. Pressing Esc backs out to the "FREE" state. 12.1. ERASING A CURVE While in the "CURMOD" state, the Erase option is accessed by pressing E. This places a prompt in the menu box ("Erase selected curve (Y/N)"), and sets the state to "ERASE." If you want to erase the curve, press Y. This erases the dashed curve. The cursor remains at the originally selected end point, the menu box disappears, and the state returns to "FREE." Any other key will not erase the curve, and returns you to the curve modification menu and state "CURMOD." You cannot erase a curve bounding a filled area unless you first change the fill to none (-1) (see Section 14.3). If you try to erase such a curve, an error message appears, the curve modification menu reappears, and the state returns to "CURMOD." 12.2. CHANGING A CURVE While in the "CURMOD" state, the Change option is accessed by pressing C. IF both endpoints of the selected curve are on the screen, the curve is dashed and a straight line appears between the curve's endpoints. The state is now "CHANGE." (If one of the selected curve's endpoints is not on the screen, you hear a beep (and see an error message if toggled on) and return to the "FREE" state.) Now you can alter the shape of the replacement curve, but NOT the placement of its endpoints) via the F2, cursor, and F3 keys, as described above in Section 7.2. You also can smooth the curve, as described in Section 10. Throughout the alteration process, the original curve is dashed; this dashed curve disappears when F3 is pressed to end the process. Note: during the changing procedure, if Esc is pressed, the original curve becomes undashed, with the cursor at the curve's starting endpoint, and the state returns to "FREE." 12.3. CHANGING A CURVE'S LINE PARAMETERS Each curve has four line parameters associated with it: line weight ("thickness"), line gray percentage (the gray shading of the curve, ranging from white to black), linecap (the style of the ends of the curve), and dash pattern. Each newly drawn curve is assigned the current "GLOBAL" values for these parameters. When PictureThis is first loaded, the values for the global parameters are as follows: line weight, 1 PostScript point (EXACTLY 1/72 inch; NOT equal to 1 traditional printer's point, which is only APPROXIMATELY 1/72 inch); line gray, 100% (black; 0% corresponds to white); dash, solid (that is, no dash at all); linecap, round. These GLOBAL line parameters may be changed at any time (see Section 15). The following procedures will change 21 a SELECTED curve's line parameters ("LOCALLY"), from the "CURMOD" menu. The Line option is accessed by pressing L. This allows changes in line weight, line gray percentage, linecap, and dash pattern. The state changes to "THISLN," and a line parameter change menu appears. The top line of the menu lists items which can be altered (Weight, Gray, Linecap, and Dash) and the word Keep. The second line of the menu displays current values of these parameters for the selected curve (shown dashed). 12.3.1. CHANGING LINE WEIGHT To change the weight of the selected curve, press W when the line parameter menu is showing. A line weight prompt appears. Its first line displays the current line weight in PostScript points (one PostScript point = EXACTLY 1/72 inch). The second line requests that you enter a new line weight in points. If you are satisfied with the current line weight, press Enter or Esc; this takes you back to the line parameter menu with no change in line weight of the selected curve. If you want to change the line weight, key in a number between -0 and 327.00 and then press Enter. If you set the line weight between .01 and 327.00, the weight of the curve on the Quickshow screen (see Section 13) and the PostScript output equals that value (as close as the output device allows). If you set the weight to 0, the curve's thickness is "hairline," the least thickness available on the particular output device used (quite thin on 300 dpi laser printers; almost invisible on 1270 and 2540 dpi imagesetters). If you set the weight to a negative number, it is stored as -1. In PictureThis, -1 line weight means that the curve is a "construction" or "blue" curve; that is, it does not appear on the output at all, but is used only as a reference curve, or is part of a trail filled with a gray shade, but doesn't show (see Section 14.3). A curve with a line weight of -1 is shown as dotted on the drawing screen of PictureThis, and it does not appear at all on the Quickshow screen (see Section 13) or the Viewscreen (see Section 25.1). An invalid input results in an error message (and a chance to try again). After you have entered a valid line weight, the line parameter menu reappears with the line weight in the second line changed to the new line weight. 12.3.2. CHANGING LINE GRAY To change the selected curve's gray shade, press G when the line parameter menu is showing. A line gray prompt will appear. The first line of this prompt indicates the current line gray, from 0% (white) to 100% (black). The second line requests that you enter a new line gray percentage. If you are satisfied with the current gray, press Enter or Esc, and the line parameter menu reappears with an unchanged line gray percentage. If you want to change the line gray percentage, enter a number between 0 (white) and 100 (black). An invalid entry results in an error message (and a chance to try again). When you have entered a legal line gray percentage, the line parameter menu reappears with the 22 line gray percentage in the second line changed to the new line gray percentage. 12.3.3. CHANGING THE LINECAP To change the selected curve's linecap, press L when the line parameter menu is showing. A linecap menu appears. The first line of the menu shows the current linecap. The second line allows you to change the cap to Butt, Round, or Square. Pressing Esc returns to the line parameter menu without changing the linecap. Pressing B, R, or S changes the linecap to butt, round, or square, respectively, and returns to the line parameter menu with the new linecap displayed in the second line. For thin curves, the linecap has little importance, since it is barely visible; for thick curves, the linecap can be very significant. A butt cap is a straight line oriented perpendicular to a curve, located at the curve's endpoint. A round cap is a semicircle with radius equal to one-half of the line width, centered on the curve's endpoint (so it extends beyond the endpoint). A square cap is a straight line oriented perpendicular to the end of the curve, located beyond the curve's endpoint a distance equal to one-half of the line width. To see the differences among these linecaps, draw three horizontal lines on the screen with the same large line weight (say, 100 points), and choose a different linecap for each line, then view the lines on the Quickshow screen (see Section 13). 12.3.4. CHANGING THE DASH PATTERN To change the selected curve's dash pattern, press D when the line parameter menu is showing. A dash pattern menu appears. The current dash pattern is shown on the second line of the menu. You can choose a new dash pattern from six user-settable dash patterns (see Section 15.2) plus the (default) solid setting. Each dash pattern has a number, shown in parentheses at the right of the second line of the menu. Solid is 0; the user-settable patterns are 1 through 6. Press Spacebar, +, and/or - repeatedly to cycle through the dash patterns; notice that, for each dash pattern, information is provided about its current settings (see Section 15.2 for details on these settings). If you want to change the Offset setting (between 0.0 and 25.5 points; see Section 15.2) for the dash pattern shown, press O; you're shown the current offset setting and prompted to key in a new one (press Esc to return to the dash pattern menu without changing the offset setting). At the dash pattern menu, press K (for "Keep") or Enter to use the dash pattern shown, or press Esc to use the old dash pattern (with its old offset setting); in either case, the line parameter menu reappears. 12.3.5. SAVING THE LINE PARAMETERS To save the line parameters displayed on the second line of the line parameter menu, press K (for "Keep") or Enter. This saves the line parameters for the selected curve and returns to the "FREE" state. If you press Esc while the line parameter menu is on the screen, any changes which you made 23 to the weight, gray percentage, linecap, and/or dash pattern are NOT saved. You can change any of the line parameters any number of times before you press K or Enter; only the final values are saved. 13. QUICKSHOW SCREEN The Quickshow screen allows you to see a quickly drawn screen representation corresponding to "showpage" in the PostScript language -- in other words, a representation of what the hard copy output will look like. To see the Quickshow screen for the current drawing screen (only in the "FREE" state), press Q. The Quickshow screen can be accessed at any magnification, and it can be zoomed or scrolled (see Section 6). The Quickshow screen "clips" curves (stops drawing them) at the current frame boundaries, shows approximations for proper line weights, line gray percentages, and linecaps (see Section 12.3), and shows dashed curves as dashed (though NOT with approximations to their individual dash patterns). It also shows joins and fills of trails (see Section 14) and layering of objects (see Section 16.4). Of course, the low resolution of the screen makes accurate representation of fine lines impossible, some curves have the "jaggies," and the grays are VERY approximate -- still, the Quickshow screen is a good way to predict how the PostScript output will appear. Note: PostScript hard copy output does NOT show dots (drawn by pressing F1 and then F3, without moving the cursor in between) with non-solid dash patterns or with square or butt linecaps, so such dots also are NOT shown on the Quickshow screen. Dots with dash setting 0 (see Section 15.2) and round linecaps (see Section 12.3.3) -- the defaults in PictureThis -- are shown as circles with a diameter equal to the line weight on both the hard-copy output and on the Quickshow screen. When the Quickshow screen has finished drawing, pressing Esc returns the state to "FREE" and restores the drawing screen to reflect what was last on the Quickshow screen. Pressing Esc while the Quickshow screen is drawing stops the drawing. Pressing Esc again returns to the "FREE" state. Very wide curves appear rather slowly on the Quickshow screen when drawn with the highest possible precision (especially if you have a slow computer). For this reason, there is a user-settable "flatness" parameter that allows a trade-off between the speed and precision of such curves on the Quickshow screen. To set this parameter, press F9. The state changes to "MISC," and the miscellaneous operations menu will appear. To change the flatness parameter, press F. A Flatness menu appears, and you can choose between flat (faster) curves (by pressing F) or round (more accurate) curves (by pressing R). The default setting for the flatness parameter is flat (faster). If they are very wide, flat curves are indeed "flatter" than round curves on the Quickshow screen, but not on the PostScript output. At high magnifications, sometimes there are errors in the ways extremely wide lines are shown on the Quickshow screen. This happens very rarely (due to an overflow) and is essentially harmless, so we decided not to correct it (an undertaking which would make the program run significantly 24 slower). Saving and retrieving drawing files can be done while on the Quickshow screen (see Sections 19.1 and 19.2). To change the background color of the CGA Quickshow screen, press B repeatedly to cycle through the 16 possibilities. The default is light gray. This is especially useful if running in CGA mode on a VGA screen. 14. TRAILS, FILLS, AND JOINS A trail is a group of curves. Trails are useful because they can bound areas filled with gray shades, and because the points where the curves in a trail meet can be made to join neatly (important for wide curves). (Note: Trails are similar but NOT identical to the "paths" defined in the PostScript language.) The most common trails are continuously connected curves. If you draw a curve, then draw a second curve connected so that its first endpoint is the same as the first curve's second endpoint, (that is, you press F1 for the first endpoint of the second curve WITHOUT moving the cursor after pressing F3 to establish the first curve), you have drawn a trail of two curves. As long as you continue to connect the curves in this manner ("head-to-tail," so to speak), they are all automatically in one trail. If you connect the second endpoint of the final curve in your trail to the first endpoint of the first curve, you have made a closed trail. Closed trails can be filled with a gray shade. (Actually, open trails can be filled too, but this usually isn't desirable. When you fill an open trail, a construction (weight: -1) line automatically connects the beginning and end of the set of curves, to make a closed boundary suitable for filling.) Boxes (see Section 8.1), squares (Section 8.2), circles (Section 8.3), and ovals (ellipses) (Section 8.4) all are automatically made into closed trails when they are drawn. Most of the time while drawing in PictureThis, you need not be concerned about trails. They are automatically made for you as you draw curves. Every curve is placed in a trail, as noted above (some trails contain only one curve), and no curve is in more than one trail. However, if you want to fill an area that is enclosed by curves which weren't continuously drawn, or if you want to manipulate only part of an existing trail, you can still do so by defining a new trail (see Section 14.1). You also can define trails which are made of two or more unconnected subtrails; these are useful for doing "fancy" fills, especially for making holes in filled areas (see Section 14.3). To define or modify existing trails, access the trail menu by pressing F6. The state is changed to "TRAIL," and the trail menu appears. This menu allows you to define a new trail, or erase, fill, or change the line parameters for an existing trail. It also allows you to copy an object (defined in Section 16) to one or more endpoints of a trail, as described in Section 17.7. 14.1. DEFINING A TRAIL You can define a trail composed of any previously drawn curves. To begin this operation while in the "TRAIL" state, 25 press D. The state changes to "DEFTRL," the cursor jumps to the nearest endpoint, and any curves with that endpoint are dashed (just as if you had pressed Del). Press Space, +, and/or - repeatedly until the cursor is on the endpoint where you want to BEGIN a new trail. Next, press Enter. A box with instructions ("Next curve: +, Space"/"Select curve: Enter"/"Next endpoint: Del"/"Done: D") appears on the left side of the screen, and one curve with the selected endpoint is dashed to distinguish it. If you want to start the trail with the dashed curve, press Enter. Otherwise, by pressing Space, +, and/or - repeatedly, you can cause each of the curves with the endpoint to be dashed successively. When the curve with which you want to start the trail is dashed, press Enter. This curve is dashed-and-dotted to show that it has been chosen as part of your trail, and the cursor moves to the other endpoint of the curve, where you can again select any curve (except ones already selected for the trail) to be the next curve in the trail. Continue with this process until the final curve which you want in the trail is selected. Then press D. Your trail is established. Alternatively, if your trail is to be made of disjoint subtrails (see Section 14.3.2 for why you might want to do this), with the cursor at any endpoint, instead of immediately selecting an associated curve, move the cursor to a different endpoint to start a new subtrail by pressing Del, followed by Space, +, and/or - repeatedly, and finally Enter to select a new endpoint as usual. Then you can continue, as above, selecting curves for your subtrail. You can make as many subtrails as you want. When the entire trail is complete, press D to establish it. (Note: In the process of defining the trail, if you reach an endpoint for which all associated curves have already been chosen for the trail, you have a choice only between pressing D to establish the trail and Del to start another subtrail.) If at any time during the trail definition process you press Esc, the selected curves are returned to normal, the state becomes "TRAIL," and the trail menu reappears. When your trail has been established, it remains "dashed- and-dotted" while two prompts appear successively, allowing the specification of a fill percentage and changed line parameters for (ALL curves in) the newly defined trail. The first prompt asks for a gray fill percentage; it is identical to the prompt described in Section 14.3.1. (Note: Once a new trail has been established by pressing D, you CANNOT "back out" to the trail defining process. Pressing Esc while at the fill prompt just continues with the next prompt and leaves the defined trail with NO (-1; transparent) fill.) The next prompt states: "Change parameters of ALL curves (Y/N)?" If you answer Y, a line parameter menu identical to the one described in Section 14.4 appears, and you can change the line parameters of ALL curves in the trail to be identical and set the join parameter (see Section 14.4.2) for the trail. When these two prompts have been answered, the new trail is again solid and the state returns to "FREE." What happens to the previously defined trails that contained curves now in the newly defined trail? PictureThis automatically takes care of this in one of two ways. If a curve was in a trail which had a fill, or was part of an object (see Section 16), the curve is duplicated 26 automatically, so identical curves are in BOTH the old and new trails. (Remember, a curve cannot be in more than one trail at a time.) Otherwise, the curve is removed from its old trail. (If all curves are removed from a trail, the trail becomes undefined.) The process of defining a trail sounds rather complicated in words, but it is actually quite simple for the most common class of trails (simple closed trails) -- and it isn't very difficult for even quite complex trails. PictureThis automatically does most of the work for you. Just try it and check your results with the Quickshow screen. Also, if you are careful to draw curves continuously, as described above, you will only rarely have to define a trail. 14.2. ERASING A TRAIL An entire trail can be erased, whether filled or not. At the trail menu, press E. The state changes to "ERASE," the cursor jumps to the closest initial point of a trail, and the entire trail is dashed. (The initial point of a trail is the first endpoint of the first curve drawn for automatically defined trails, or the first endpoint selected for manually defined trails.) A box with instructions appears on the left side of the screen ("Next: +, Space"/ "Previous: -"/"Select: Enter"). If the dashed trail is the one you want to erase, press Enter. If you want to select a different trail, press Space, +, and/or - repeatedly until the trail you want to erase is dashed, then press Enter. If only one trail's initial point is on-screen, it is selected automatically, and the instruction box does not appear. (If you press Esc during this process, the trail menu reappears, and the state returns to "TRAIL.") A prompt appears: "Erase selected trail? (Y/N)." If you want to erase the dashed trail, press Y; the trail is erased and the state returns to "FREE." Otherwise, press any other key; the trail menu reappears and the state returns to "TRAIL." 14.3. FILLING A TRAIL An already existing trail (either automatically or manually defined) can be filled with a gray shade. 14.3.1. SPECIFYING A FILL GRAY PERCENTAGE While in the "TRAIL" state, to fill an unfilled trail, or to change the gray percentage of (or "unfill") a previously filled trail, press F. The state changes to "FILL," the cursor jumps to the closest initial point of a trail, and that trail is dashed. (The initial point of a trail is the first endpoint of the first curve drawn for automatically defined trails, or the first endpoint selected for manually defined trails.) A box with instructions will appear on the left side of the screen ("Next: +, Space"/ "Previous: -" /"Select: Enter"). If the dashed trail is the one you want to fill, press Enter. If you want to select a different trail, press Space, +, and/or - repeatedly until the trail you want to fill is dashed, then press Enter. If only one trail has its initial point on-screen, it is selected 27 automatically, and the instruction box does not appear. (If you press Esc during this process, the trail menu reappears, and the state returns to "TRAIL.") A fill prompt appears. The first line of the prompt gives the current fill percentage, from 0% (white) to 100% (black). A fill percentage of -1% means that the trail is not filled; it is transparent, NOT opaque. The second line requests that you enter a gray percentage. If you are satisfied with the current fill gray percentage, just press Enter and it is not changed. If you want to "unfill" the trail, enter a -1 at the prompt. Otherwise, enter a number between 0 (white) and 100 (black). Upon your valid entry, the trail is filled and the state returns to "FREE." (If you press Esc instead of entering a fill, the state returns to "TRAIL," and the trail menu reappears.) The Quickshow screen shows approximate grays as 33 gradually darkening patterns. Actual grays on PostScript output devices vary considerably. You will have to experiment with the grays on the particular printer you are using to find the most appropriate ones for your drawings. 14.3.2. RESULTS OF FILLING A TRAIL PictureThis (and PostScript) fills are NOT like those of "paint" programs, in which a fill "paints" the interior of a simple closed boundary. There are three main differences: 1. PictureThis fills (except "no fill," -1) are "opaque." If one trail overlaps another trail, and the trail "in front" is filled, the portions of the second trail which are "behind" (or "under") the first trail are not visible on the Quickshow screen or on the PostScript output. Try this by drawing a circle and filling it with some shade of gray. Then draw a box that overlaps the circle and fill it with a different shade of gray. Now look at it on the Quickshow screen. Part of the circle is entirely covered by the box. You actually can see the circle draw and then see the box cover it. It is as if the objects were cut out and pasted on the drawing, in order. The order in which trails are "pasted" on the Quickshow screen (and the PostScript output) initially is determined by the order in which they are drawn or defined (the earliest drawn/defined are "pasted on" first), but the order can be changed easily (see Section 16.4). 2. PictureThis trails which form simple closed boundaries, such as boxes or circles, are filled exactly as you would expect: their interiors are filled with the selected shade of gray. (This is the most useful type of trail to fill and should suffice for most purposes.) But trails are not at all limited to simple closed boundaries. A single trail can cross itself many times, and can have many disjoint subtrails. How does PictureThis determine which parts of a complex trail will be inside the trail, and thus filled? It uses the "non-zero winding number rule." This means that starting at any point, it (conceptually) draws a line from that point in any direction to infinity, examining each curve of the path the line crosses. Starting with a count of zero, it adds one each time a curve crosses the line from left to right and subtracts one each time a curve crosses the line from right to left. When it has completed crossing all the curves in the trail along the line, if the count is 28 zero, the starting point is outside the trail and will not be colored gray; otherwise, the point is inside the trail and will be colored. In practice, that means that the directions in which trails are drawn or defined is important for complex trails. However, you'll probably need to worry about the direction of trails only very rarely. It's fun to draw or define complex trails with many crossings and subpaths and then fill them and view them on the Quickshow screen. However, complex trails aren't very useful in most "real" drawings. There is one notable exception, however: occasionally, you might want to create a "window" or "hole" through a trail, to let what is behind the trail show through. This is very simple to accomplish. As an example, try this. Draw two boxes, one with its boundaries totally inside the other, like a window in a door. Now define a new trail consisting of two subtrails (the two boxes) as follows: Press F6 to access the trail menu. Press D to define a trail. Press + until the cursor is on the lower left endpoint of the outer box, and then press Enter. Press + and Enter or just Enter to select the left side of the box. The left side of the box is dashed-and-dotted, indicating that it is part of the trail, and the cursor jumps to the top left corner of the outer box. Press Enter three more times, selecting the top, right, and bottom sides of the outer box. The cursor should now be at the lower left corner of the outer box again, and the outer box should be all dashed-and-dotted. Now press Del followed by + repeatedly until the cursor is on the lower left corner of the inner box. Then press Enter. Select the bottom of the inner box and press Enter. Press Enter three more times to select the right, top, and left sides of the inner box. Notice that you defined the subtrail of the inner box in the direction OPPOSITE that of the subtrail of the outer box. (The DIFFERENCE IN DIRECTIONS OF THE SUBTRAILS is what is important, not which endpoint you start with, or which direction you initially choose.) Now press D to establish the trail. At the fill prompt, enter some shade of gray and press any key except Y to answer the query about changing the parameters of all curves in the trail. Now press Q to see the Quickshow screen. Your screen should show you a box with a box-shaped "window" in it. Anything behind the trail will show through the "window." This procedure generalizes to much more complex shapes in the obvious way; just be sure that the inner trail is defined in the opposite direction to the outer trail, if you want a "window." (If the inner and outer trails are defined in the SAME direction, the window will be FILLED.) 3. PictureThis can fill trails which are not closed. It does this by drawing a straight line with line weight -1 (that is, a construction line) from the final endpoint of each subtrail to the first point of that subtrail, and then filling the resulting trail. Try it. Draw a trail of two curves on the screen (with the second endpoint of the second curve NOT the same as the first endpoint of the first curve) and then fill it. PictureThis automatically connects the end of the trail with the beginning of the trail and fills the resulting trail. (You'll probably find that this feature is useful only occasionally.) 14.4. CHANGING THE LINE PARAMETERS OF A TRAIL 29 PictureThis allows you to change the line parameters for ALL of the curves in a trail at one time. Trails are made up of curves with various line weights, line gray percentages, linecaps, and dash patterns. (This is where trails differ from PostScript-language "paths," each of the latter made up of curves which all have the same line weight, line gray percentage, dash, and linecap.) It is often (but not always) best for all of the curves in a trail to have the same line parameters (see Section 14.4.3), making the trail equivalent to a PostScript "path." To change the line parameters for all of the curves in a trail, while in the "TRAIL" state press L. The state changes to "TRLNS," the cursor jumps to the closest on-screen initial point of a trail, and that trail is dashed. (The initial point of a trail is the first endpoint of the first curve drawn for automatically defined trails, or the first endpoint selected for manually defined trails.) A box with instructions appears on the left side of the screen ("Next: +, Space"/ "Previous: -"/"Select: Enter"). If you want to change the line parameters of the dashed trail, press Enter. If you want to select a different trail, press Space, +, and/or - repeatedly until the trail you want to change is dashed, then press Enter. If only one trail is on-screen, it is selected automatically, and the instruction box does not appear. (If you press Esc during this process, the trail menu reappears, and the state returns to "TRAIL.") A line parameter menu appears, similar but not identical to the line parameter menu for single curves (see Section 12.3). The top line of this menu shows the items which can be changed ("Weight," "Gray," "Linecap," and "Dash," as in the line parameter for single curves, and a new item: "Join"), plus the word "Keep." The second line of the menu displays the current values of these parameters for the selected trail. If any of these parameters have different values for different curves in the trail, the word "MIXED" appears under that parameter. 14.4.1. CHANGING THE LINE WEIGHT, LINE GRAY, LINECAP, OR DASH PATTERN FOR ALL CURVES IN A TRAIL To change the line weight, line gray percentage, linecaps, or dash for all the curves in a trail, press W, G, L, or D respectively, and proceed exactly as for a single curve (see Section 12.3). (Note: You subsequently can change the line parameters of any individual curve in the trail to any value.) 14.4.2. CHANGING THE JOIN FOR A TRAIL The word "Join" in the top line of the menu refers to the manner in which the curves in a trail are connected together where they join at endpoints. Like linecaps, linejoins are insignificant for thin lines, but important for thick lines. To change the linejoin of a trail, press J. The join menu appears. The first line shows the current linejoin. The second line requests that you enter a new linejoin. The three possible linejoins are mitered, rounded, and beveled. For mitered joins, the outside edges of the curves are extended in straight lines until they meet, and filled in. For rounded joins, the curves are connected by a rounded 30 end, formed by a circle with diameter equal to the line width. For beveled joins, the curves are connected with butt linecaps and filled in to form a bevel. If a mitered join is specified for a join where two curves meet at a small angle (anything less than approximately 11 degrees), the join is beveled to prevent the join from being too long. When a trail is drawn or defined, the join parameter for that trail is set to the current global linejoin. The initial setting for the global join in PictureThis is rounded, but this can be changed at any time (see Section 15.1). Boxes always are given mitered joins (square corners) initially, no matter what the global join value, but a box's join can be changed later. To set the join for a trail, press M, R, or B for mitered, rounded, or beveled linejoins, respectively. Pressing Esc backs out without changing the current linejoin. In all of these cases, the line parameters menu reappears. When you are satisfied with all the line parameters, press K (for "Keep") or Enter; the line parameters for all of the curves in the trail and the trail's join are changed, and the state returns to "FREE." (If you press Esc, the parameters are not changed, the state returns to "TRAIL," and the trail menu reappears.) A good way to see the different types of linejoins is to set the global line weight to some high value, say 100 points (see Section 15.1), draw three similar trails having at least two curves which meet at an angle, set the linejoin values differently for each of the trails, and view their joins on the Quickshow screen. Also try drawing a box with thick lines and changing its linejoin value. 14.4.3. TRAILS MADE OF CURVES WITH DIFFERENT LINE PARAMETERS If a trail is made of curves all of which have the same line weight and line gray percentage, the joins at all endpoints are set by the linejoin specified for the trail. If the trail is closed (or subtrails are closed), even the final join of the trail (or subtrail) where the final curve connects to the initial curve are as specified. If the trail (or subtrail) is not closed, the linecaps at BOTH ends of the trail (or subtrail) are whatever linecap type is specified for the LAST curve of the trail (or subtrail). If a trail is made of curves of different line weights, different line gray percentages, or different dash patterns, each time there is a change in one or more of the three parameters along the trail, PictureThis treats it as a the beginning of a new subtrail (even if the last curve is connected to the current one). That is, as long as the weight, gray, and dash pattern are the same for each successive curve, the joins are the specified join, but if the next curve has a different weight, gray, and/or dash pattern the "subtrail" ends with a linecap which is the same as that of the last curve before the change (its first linecap is the same, too). Then the next curve starts with a linecap. NO JOIN IS MADE. If there are any changes in weight, gray, or dash pattern along a closed trail, the final join is NOT joined, even if the last curve is the same line weight, gray, and dash pattern as the first curve. If you are in doubt as to which linecaps and joins will appear on a particular trail, check it on the Quickshow screen, at 31 large magnification if necessary. As you can see, it is generally desirable to have trails with curves all of one line weight and gray, but there are times when you want to fill an area bounded by curves of different grays or line weights. This is perfectly legal, and, if you are careful, the places where two linecaps meet can look perfectly acceptable (see Section 27.4). 32